.prompt-generator-modal {
  .ant-modal-content {
    border-radius: 12px;
    padding: 20px;
  }

  .ant-modal-body {
    height: 600px -72px;
    max-height: calc(100vh - 200px);
  }

  .prompt-generator-title {
    display: flex;
    align-items: center;

    .prompt-generator-icon {
      margin-right: 8px;
    }

    span {
      font-size: 16px;
      font-weight: 600;
    }
  }
}

.prompt-generator-container {
  display: flex;
  gap: 16px;
  position: relative;
  height: calc(100% - 0px); /* 减去上边距 */

  &::after {
    content: "";
    position: absolute;
    top: -50px;
    bottom: -20px;
    left: 50%;
    width: 1px;
    background-color: #e8e8e8;
    transform: translateX(-50%);
  }
}

.prompt-generator-form {
  flex: 1;
  padding-right: 24px; /* 增加右边距，为分隔线留出空间 */
  height: 100%;
  overflow-y: auto;

  .prompt-generator-description {
    font-size: 13px;
    color: rgba(18, 18, 18, 0.5);
    margin-bottom: 16px;
    margin-top: 10px;
    line-height: 1.5;
    padding: 2px;
  }
}

.prompt-generator-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.prompt-generator-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-left: 24px; /* 增加左边距，为分隔线留出空间 */
  height: 524px;

  &-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
  }

  &-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

.prompt-generator-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 500px;
}

.prompt-result-section {
  margin-bottom: 12px;

  .prompt-result-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    height: 38px;
    line-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .prompt-result-content {
    background-color: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px;
    min-height: 120px;

    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;

    &.prompt-content {
      height: 296px;
    }

    &.welcome-content {
      height: 112px;
    }
  }
}

.prompt-generator-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;

  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(69, 81, 229, 0.1);
    border-radius: 50%;
    border-top-color: #4551e5;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }

  .loading-text {
    color: rgba(18, 18, 18, 0.6);
    font-size: 14px;
  }
}

.prompt-generator-use-btn {
  align-self: flex-end;
  margin-top: 16px;
  border: none;
}

.gradient-generate-btn:not([disabled]) {
  > span {
    position: relative;
  }

  &::before {
    content: "";
    background: linear-gradient(309.45deg, #e941e8, #f375b4, #fbb910);

    position: absolute;
    inset: -1px;
    opacity: 1;
    transition: all 0.3s;
    border-radius: inherit;
  }

  &:hover::before {
    opacity: 0.8;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
